package com.jiyi.activity.design;

import android.os.Bundle;
import android.support.design.widget.Snackbar;
import android.support.v7.widget.Toolbar;
import android.view.MenuItem;
import android.widget.TextView;

import com.swift.maintenance.R;

import butterknife.BindView;
import butterknife.ButterKnife;

public class StartDesignActivity extends ToolBarActivity {


    @BindView(R.id.tvTitle)
    TextView tvTitle;
    @BindView(R.id.tbMain)
    Toolbar tbMain;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_start_design);
        ButterKnife.bind(this);
        initActionBar(tbMain,tvTitle,"材质设计");
    }


    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        Snackbar snackbar;
        switch (item.getItemId())
        {
            case android.R.id.home:
                finish();
                return  true;
            case R.id.search:
                snackbar = Snackbar.make(tbMain,"搜索",Snackbar.LENGTH_SHORT);
                snackbar.show();
                break;
        }
        return super.onOptionsItemSelected(item);
    }
}
